
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link href="../css/admin.css" rel="stylesheet" type="text/css" />
<title></title>
</head>
<body>

<script language="JavaScript" type="text/JavaScript">
<!--
function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_validateForm() { //v4.0
  var i,p,q,nm,test,num,min,max,errors='',args=MM_validateForm.arguments;
  for (i=0; i<(args.length-2); i+=3) { test=args[i+2]; val=MM_findObj(args[i]);
    if (val) { nm=val.name; if ((val=val.value)!="") {
      if (test.indexOf('isEmail')!=-1) { p=val.indexOf('@');
        if (p<1 || p==(val.length-1)) errors+='- '+nm+' must contain an e-mail address.\n';
      } else if (test!='R') { num = parseFloat(val);
        if (isNaN(val)) errors+='- '+nm+' must contain a number.\n';
        if (test.indexOf('inRange') != -1) { p=test.indexOf(':');
          min=test.substring(8,p); max=test.substring(p+1);
          if (num<min || max<num) errors+='- '+nm+' must contain a number between '+min+' and '+max+'.\n';
    } } } else if (test.charAt(0) == 'R') errors += '- '+nm+' is required.\n'; }
  } if (errors) alert('The following error(s) occurred:\n'+errors);
  document.MM_returnValue = (errors == '');
}
//-->
</script>

<script language="JavaScript" type="text/JavaScript">
<!--
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function MM_goToURL() { //v3.0
  var i, args=MM_goToURL.arguments; document.MM_returnValue = false;
  for (i=0; i<(args.length-1); i+=2) eval(args[i]+".location='"+args[i+1]+"'");
}
//-->
</script>

<script language="JavaScript"> 
<!-- 
function validate_ascii_data(urstr) 
{ 
  var i; var result; 
  for(i=0; i<urstr.length; i++) { 
    if((urstr.charAt(i) < " ") || (urstr.charAt(i) > "~")) 
      return false; 
  } 
  return true; 
} 
function validate_email(email) 
{ 
  if (!validate_ascii_data (email)) { 
    return false 
  } 

  var invalidChars = "\"|&;<>!*\'\\"   ; 

  for (var i = 0; i < invalidChars.length; i++) { 
    if (email.indexOf(invalidChars.charAt(i)) != -1) { 
      return false; 
    } 
  } 
  
  if (email.indexOf("@")==-1){ 
     return false; 
  } 
         
  if (email.indexOf(" ") != -1){ 
    return false; 
  } 

  if (window.RegExp) { 

    var reg1str = "(@.*@)|(\\.\\.)|(@\\.)|(\\.@)|(^\\.)"; 
    var reg2str = "^.+\\@(\\[?)[a-zA-Z0-9\\-\\.]+\\.([a-zA-Z]{2,3}|[0-9]{1,3})(\\]?)$"; 
     
    var reg1 = new RegExp (reg1str); 
    var reg2 = new RegExp (reg2str); 
    if (reg1.test(email) || !reg2.test(email)) { 
      return false; 
    } 
  } 
  return true; 
} 




function checkForm(theform) { 

/*
if (theform.name_d.value=="") { 
    theform.name_d.focus(); 
    alert("You didn't specify a valid Product Name (Danish)"); 
    return false; } 
*/
if (theform.name.value=="") { 
    theform.name.focus(); 
    alert("You didn't specify a valid Product Name (English)"); 
    return false; } 
/*
if (theform.name_h.value=="") { 
    theform.name_h.focus(); 
    alert("You didn't specify a valid Product Name (Chinese)"); 
    return false; } 
*/
if (theform.short_desc.value=="") { 
    theform.short_desc.focus(); 
    alert("You didn't specify a valid Short Description (English characters)"); 
    return false; } 
/* 
if (theform.s_dis_d.value=="") { 
    theform.s_dis_d.focus(); 
    alert("You didn't specify a valid Short Description (Danish characters)"); 
   return false; } 

if (theform.s_dis_h.value=="") { 
    theform.s_dis_h.focus(); 
    alert("You didn't specify a valid Short Description (Chinese characters)"); 
    return false; } 
*/

}
//--> 
</script> 
<!--<?php
print <<<EOT
-->

<form action="p_product.php" method="post" enctype="multipart/form-data" name="theform" onSubmit="return checkForm(theform);">
<!--hidden filed-->
<input name="action" type="hidden" value="add">
<input name="code" type="hidden" value="{$code}">





<br> 
<table width="95%" border="0" align="center">
  <tr> 
    <td align="right">
	
	<input type="image" src="../images/admin/bt_cancel.gif" width="78" height="23" onclick="Redirect('product_menu.php',1);return false;"> 
	<input type="image" src="../images/admin/bt_save.gif" width="76" height="22"> 


    </td>
  </tr>
</table>
<table width="95%" border="0" align="center">
  <tr>
    <td valign="top">&nbsp;</td>
  </tr>
  <tr> 
    <td valign="top">

<table width="100%" style='border-collapse:collapse' bordercolor=#dddddd bgcolor=#ffffff border=1 cellspacing=0 cellpadding=0  align="center">
  <tr>
    <td colspan="2">&nbsp;</td>
    <td width="25%" align="center">Chinese</td>
    <td width="25%" align="center">English</td>
    <td width="25%" align="center">Danish</td>
  </tr>
  <tr>
    <td colspan="2">Product Code</td>
    <td>{$code}</td>
    <td>{$code}</td>
    <td>{$code}</td>
  </tr>
  <tr>
    <td colspan="2">Product Name</td>
    <td><input type="text" class="text" name="name_c" style="width:250"></td>
    <td><input type="text" class="text" name="name" style="width:250"></td>
    <td><input type="text" class="text" name="name_d" style="width:250"></td>
  </tr>
  <tr>
    <td colspan="2">Short Description </td>
    <td><textarea class="text" name="short_desc_c" rows="3" cols="38"></textarea></td>
    <td><textarea class="text" name="short_desc" rows="3" cols="38"></textarea></td>
    <td><textarea class="text" name="short_desc_d" rows="3" cols="38"></textarea></td>
  </tr>
  <tr>
    <td colspan="2">Long Description </td>
    <td><textarea class="text" name="long_desc_c" rows="10" cols="38"></textarea></td>
    <td><textarea class="text" name="long_desc" rows="10" cols="38"></textarea></td>
    <td><textarea class="text" name="long_desc_d" rows="10" cols="38"></textarea></td>
  </tr>
  <tr>
    <td colspan="2">Picture</td>
    <td colspan="3" ><input type="file" class="text" name="pic" style="width:750"></td>
  </tr>
  <tr>
    <td colspan="2">Video</td>
    <td colspan="3" ><input type="file" class="text" name="video" style="width:750"></td>
  </tr>
  
  <tr>
    <td colspan="2">Video Name</td>
    <td colspan="3"><input type="text" class="text" name="video_name" style="width:300"></td>
  </tr>
  
  <tr>
    <td colspan="2">Type</td>
    <td colspan="3">

                    <table width="100%" border="0" cellspacing="1" cellpadding="1" class="tb">
					 <tr class="tbheader">
                      <td width="47%" align="left">Type/Sub Type</td>
                      <!--<td width="53%" align="center">Product Sequence</td>-->
                    </tr>
					{$type_select}
					</table>	</td>
  </tr>
  <tr>
    <td colspan="2">Category</td>
    <td colspan="3">
	
<table width="100%" border="0" cellspacing="1" cellpadding="1" class="tb">             
       <tr class="tbheader">
                      <td width="47%" align="left">Category/Sub Category</td>
                     <!-- <td width="53%" align="center">Product Sequence</td>-->
                    </tr>
{$category_select}
</table>	</td>
  </tr>
  <tr>
    <td colspan="2">Publisher</td>
    <td colspan="3" align="left">
	<select name="publiser_id" class="text" id="publiser_id" style="width:300">
	{$publisher_select}
	
	</select>	</td>
  </tr>
  <tr>
    <td colspan="2">Author</td>
    <td colspan="3" align="left">
	<select name="author_id" class="text" style="width:300">
	{$author_select}
	</select>	</td>
  </tr>
  <tr>
    <td colspan="2">Supplier</td>
    <td colspan="3" align="left">
	<select name="supplier_id" class="text" style="width:300">
	{$supplier_select}
	</select>	</td>
  </tr>
  <tr>
    <td colspan="2">Weight (g)</td>
    <td colspan="3" align="left"><input type="text" class="text" name="weight" style="width:300"></td>
  </tr>
  <tr>
    <td colspan="2">Cost</td>
    <td colspan="3"><input type="text" class="text" name="cost" style="width:300">(DKK, US)</td>
  </tr>
  <tr>
    <td colspan="2">Sales Price</td>
    <td colspan="3"><input type="text" class="text" name="price" style="width:300">(DKK, US)</td>
  </tr>
  <tr>
    <td colspan="2">VAT Amount</td>
    <td colspan="3"><input type="text" class="text" name="vat" style="width:300" value="-1">
    %(when set it -1 then its vat equals the vat set by the admin)</td>
  </tr>
  <tr>
    <td colspan="2">Stock Status</td>
    <td colspan="3">
	<input type="radio" class="" name="stock_status" value="1">&nbsp;YES
	&nbsp;&nbsp;&nbsp;&nbsp;
	<input type="radio" class="" name="stock_status" value="0" checked="checked">&nbsp;NO	</td>
	<tr>
    <td colspan="2">Stock Data</td>
    <td colspan="3">
<input name="stock_data" type="text" class="text" style="width:300" value="0">	</td>
  </tr>
  <tr><td colspan="2"></tr>
    <tr>
    <td colspan="2">Is BestSeller </td>
    <td colspan="3">
	<input type="radio" class="" name="is_best" value="1">&nbsp;YES
	&nbsp;&nbsp;&nbsp;&nbsp;
	<input type="radio" class="" name="is_best" value="0" checked="checked">&nbsp;NO	</td>
  </tr>
  
  
   <tr>
    <td colspan="2">Is Featured</td>
    <td colspan="3">
	<input type="radio" class="" name="is_featured" value="1">&nbsp;YES
	&nbsp;&nbsp;&nbsp;&nbsp;
	<input type="radio" class="" name="is_featured" value="0" checked="checked">&nbsp;NO	</td>
  </tr>
       <tr>
    <td colspan="2">Is Special</td>
    <td colspan="3">
	<input type="radio" class="" name="is_special" value="1">&nbsp;YES
	&nbsp;&nbsp;&nbsp;&nbsp;
	<input type="radio" class="" name="is_special" value="0" checked="checked">&nbsp;NO	</td>
  </tr>
       <tr>
         <td colspan="2">Publish in website</td>
         <td colspan="3"><input name="is_show" type="radio" class="" value="1" checked="checked" />
           &nbsp;YES
	&nbsp;&nbsp;&nbsp;
	<input type="radio" class="" name="is_show" value="0" />
	NO </td>
       </tr>
       <tr>
    <td colspan="2">Order</td>
    <td colspan="3"><input name="txtorder" type="text"  class="text" size="6" value="{$order}"/></td>
  </tr>
  
  
  <tr>
    <td width="19%" rowspan="2">Customer comments</td>
    <td align="right">English:</td>
    <td colspan="3"><textarea type="text" class="text" name="comments" style="width:600"></textarea></td>
  </tr>
  <tr>
    <td align="right">Danish:</td>
    <td colspan="3"><textarea name="comments_danish" class="text" id="comments_danish" style="width:600" type="text"></textarea></td>
  </tr>
</table>
<table width="100%"  border="0" cellspacing="0" cellpadding="0">
<input type="hidden" accept="" name="action" value="add">                                    <tr>
                                      <td height="30" align="right" colspan="2">
	<input type="image" src="../images/admin/bt_cancel.gif" width="78" height="23" onclick="Redirect('p_product.php',1);return false;">
	<input type="image" src="../images/admin/bt_save.gif" width="76" height="22"> 
</td></form>
</tr>
</table>

</body>
</html>
<!--
EOT;
?>-->